$().ready( function() {

    $("#PeloteroAddForm").validate( {
        rules: {
            "data[Pelotero][name]": {
                required: true,
                rangelength: [3,45]
            },
            "data[Pelotero][address]": {
                required: true,
                rangelength: [3,100]
            },
            "data[Pelotero][phone_number]": {
                required: true,
                rangelength: [3,100]
            },
            "data[Pelotero][movil_number]": {
                required: true,
                rangelength: [3,100]
            }
        },
        messages: {
            "data[Pelotero][name]": {
                required: "<?php __('Ingrese el nombre') ?>",
                rangelength: "<?php __('Ingrese entre 3 y 45 caracteres') ?>"
            },
            "data[Pelotero][address]": {
                required: "<?php __('Ingrese la dirección') ?>",
                rangelength: "<?php __('Ingrese entre 3 y 100 caracteres') ?>"
            },
            "data[Pelotero][phone_number]": {
                required: "<?php __('Ingrese el teléfono fijo') ?>",
                rangelength: "<?php __('Ingrese entre 3 y 100 caracteres') ?>"
            },
            "data[Pelotero][movil_number]": {
                required: "<?php __('Ingrese el teléfono celular') ?>",
                rangelength: "<?php __('Ingrese entre 3 y 100 caracteres') ?>"
            }
        }

    } );
} );